package com.users.rn.rncommon.util;

/**
 * @Description:
 * @Author: bluce
 * @Date: 2020/12/3 10:55
 */
public interface ReactConst {
    /**
     * debug key
     */
    String DEBUG_IP = "debug_http_host";
//    String DEBUG_PLUGIN_ID = "debug_plugin_id";

    /**
     * 加载bundle成功
     */
    int LOAD_BUNDLE_SUCCESS = 0;

    /**
     * 加载bundle发生错误
     */
    int LOAD_BUNDLE_FAILED = -1;
    /**
     * 加载assets biz bundle发生错误
     */
    int LOAD_ASSETS_BIZ_BUNDLE_FAILED = -2;
    /**
     * 加载bundle失败，由于上下文没准备好
     */
    int LOAD_BUNDLE_FAILED_BY_CONTEXT_NOT_READY = -3;

    /**
     * rn加载本地assets下的bundle包的前缀
     */
    String RN_ASSETS_PREFIX = "assets://";

    String ANIMATION_TYPE = "animationType";

    /**
     * rn日志打印tag
     */
    String TAG = "react_native";

    String REDBOX_PERMISSION_MESSAGE = "Overlay permissions needs to be granted in order for react native apps to run in dev mode";
    int REQUEST_OVERLAY_PERMISSION_CODE = 1111;

    /**
     * 公包plugin
     */
    String COMMON_BUNDLE_PLUGIN_ID = "common-rn";
    /**
     * 公包assets地址
     */
    String COMMON_BUNDLE_PATH = COMMON_BUNDLE_PLUGIN_ID + "/index.jsbundle";

    /**
     * common bundle包assets地址 rn专用
     */
    String COMMON_BUNDLE_ASSETS_PATH = RN_ASSETS_PREFIX + COMMON_BUNDLE_PATH;


    /**
     * scheme解析字段
     * 备注：前端传值保持一律小写统一
     */
    String PLUGINID = "pluginId";
    String MODULEID = "moduleId";
    String COMPONENTNAME = "componentName";
    String PARAMS = "params";
    String ENABLE = "enable";
    String LAUNCHMODE = "launchMode";
    String TYPE = "type";
    String DEBUG_HOST = "host";
    String DEBUG_STATUS = "status";

    /**
     * intent key
     */
    String INTENT_KEY_PLUGIN_ID = "intent_key_plugin_id";
    String INTENT_KEY_MODULE_ID = "intent_key_module_id";
    String INTENT_KEY_COMPONENT_NAME = "intent_key_component_name";
    String INTENT_KEY_PARAMS = "intent_key_params";
    String INTENT_KEY_EVENT_FLAG = "intent_key_eventflag";
    String INTENT_KEY_PAGE_TAG = "pageTag";

    /**
     * launchmode 启动模式
     */
    String LAUNCH_MODE_SINGLE_TOP = "singleTop";
    String LAUNCH_MODE_SINGLE_INSTANCE = "singleInstance";
    String LAUNCH_MODE_SINGLE_TASK = "singleTask";
    //测试环境设置 是否开启RN下载
    String RN_PLUGIN_DOWNLOAD = "rn_plugin_download";

    /**
     * 本地切换RN 测试版本keys
     */
    String LOCAL_KEY_CHANG_PLUGIN_PREFS = "rn_chang_plugin_version_prefs";
    String LOCAL_KEY_CHANG_PLUGIN_OPEN = "rn_chang_plugin_version_open";
    String LOCAL_KEY_CHANG_PLUGIN_INFO = "_INFO";

    /**
     * sp key值
     */
//     String KEY_DEBUG_MODE = "key_debug_mode"; //rn是否处于debug
    String RN_TYPE = "reactnative_users";
}
